package com.crealth.crmserver;

import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;

public class MessageQueue {
	private LinkedBlockingQueue<Object> queue = new LinkedBlockingQueue<Object>(20000);
	
	public Object take() throws InterruptedException {
		return queue.take();
	}
	
	public void put(Object message) throws InterruptedException {
		queue.put(message);
	}
	
	public boolean addAll(List<?> list) {
		return queue.addAll(list);
	}
	
	public int size() {
		return queue.size();
	}
}
